<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title value=''>轮播图</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />

    <style>
    body{
      background-color: #fff;
    }
    </style>
</head>

<body>
  <div id="vm" v-cloak>
      <div v-html="content" style="padding:10px;"></div>
  </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/faskclick.js"></script>
<script type="text/javascript" src="../../script/vue.2.5.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/rest.js"></script>
<script type="text/javascript">
var vm = new Vue({
    el: '#vm',
    data: {
        content:'',
        contentid:'',
    },
    created: function() {
        var _this = this;
        apiready = function() {
            _this.init();
            api.parseTapmode();
            if ('addEventListener' in document) {
                document.addEventListener('DOMContentLoaded', function() {
                    FastClick.attach(document.body);
                }, false);
            }

        }
    },
    methods: {
        init: function() {
            var _this = this;
            _this.contentid=api.pageParam.content.id;
            new rest().get('BannerList').success(function(res) {
              console.log(JSON.stringify(res))
                if (res.flag == 1) {
                    for (var i = 0; i < res.msg.length; i++) {
                      if(_this.contentid==res.msg[i].id){
                        _this.content=res.msg[i].content;
                      }
                    }
                }
            }).error(function(err) {
                console.log(JSON.stringify(err))
            }).run()
        },
    }
})

</script>
</html>
